package com.common.entity;

/**
 * @author gm
 * @description 自定义异常
 * @date 2020/1/10
 */
public class MyException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    private int code = 500;

    public MyException(String message) {
        super(message);
    }

    public MyException(int code, String message) {
        super(message);
        this.code = code;
    }

    public MyException(String message, Throwable cause) {
        super(message, cause);
    }

    public MyException(int code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
